#ifndef SERVICE_CTRL_IMPL_H
#define SERVICE_CTRL_IMPL_H
#include "service_ctrl.h"
class ServiceCtrlImpl:public ServiceCtrl
{
	ServiceMode* srcMode;
	vector<Department> deptArr;
	public:
	ServiceCtrlImpl()
	{
		srcMode = new ServiceModeImpl;
		srcMode->load(deptArr);
	}
	ServiceCtrlImpl(ServiceMode* src_mode)
	{
		srcMode = src_mode;
		srcMode->load(deptArr);
	}
	~ServiceCtrlImpl()
	{
		cout << "执行了ServiceCtrlImpl的析构函数..." << endl;
		srcMode->save(deptArr);
	}
	bool addDept(Department& dpm);
	int delDept(int ipx);
	vector<Department>& listDept(void);
	bool addEmp(int ipx,Employee& emp);
	bool delEmp(int ipx);
	bool modEmp(int ipx,Employee& emp);
	Department* listEmp(int ipx);
	vector<Department>& listAllEmp();
};
#endif//SERVICE_CTRL_IMPL_H
